/**
 * Created by Administrator on 2017/9/15.
 */
(function () {
    $.toObject=function (str) {
        var obj={};
        if(str.indexOf("&")!=-1){
            var arr1=str.split("&");
            for(var i=0;i<arr1.length;i++){
                if(arr1[i].indexOf("=")!=-1){
                    var arr2=arr1[i].split("=");
                    obj[arr2[0]]=arr2[1];
                }
            }
        }else {
            if(str.indexOf("=")!=-1){
                if(str.indexOf("=")!=-1){
                    var arr2=str.split("=");
                    obj[arr2[0]]=arr2[1];
                }
            }
        }
        return obj;
    }
})(jQuery)